package net.sh.dpinfrastructure.support.openapi;


/**
 * 
 * api返回
 * @param <T>
 * 
 * @version 1.0
 * @since JDK1.7
 * @author shaohui
 * @company 上海朝阳永续信息技术有限公司
 * @copyright (c) 2017 SunTime Co'Ltd Inc. All rights reserved.
 * @date 2017年2月10日 下午3:16:36
 */
public class DPApiResponse<T> {

    /**
     * 响应状态
     */
    private int code;
    
    /**
     * 响应消息
     */
    private String msg;
    
    /**
     * 请求耗时
     */
    private long time;
    
    /**
     * 返回数据
     */
    private T data;
    
    /**
     * 发生异常时的异常堆栈
     */
    private Throwable cause;

    
    public int getCode() {
        return code;
    }

    
    public void setCode(int code) {
        this.code = code;
    }

    
    public String getMsg() {
        return msg;
    }

    
    public void setMsg(String msg) {
        this.msg = msg;
    }

    
    public long getTime() {
        return time;
    }

    
    public void setTime(long time) {
        this.time = time;
    }

    
    public T getData() {
        return data;
    }

    
    public void setData(T data) {
        this.data = data;
    }

    
    public Throwable getCause() {
        return cause;
    }

    
    public void setCause(Throwable cause) {
        this.cause = cause;
    }
}
